﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Fluent="clr-namespace:Fluent">
  <Style x:Key="EmptyCheckBoxFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Rectangle Margin="1" SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2" StrokeThickness="1" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="CheckRadioFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2"
                     StrokeThickness="1" />
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="{x:Type Fluent:CheckBox}" TargetType="{x:Type Fluent:CheckBox}">
    <Setter Property="ToolTipService.ShowDuration" Value="30000" />
    <Setter Property="FocusVisualStyle">
      <Setter.Value>
        <Style>
          <Setter Property="Control.Template">
            <Setter.Value>
              <ControlTemplate>
                <Rectangle Margin="1" SnapsToDevicePixels="true" Stroke="Black" StrokeDashArray="1 2"
                           StrokeThickness="1" />
              </ControlTemplate>
            </Setter.Value>
          </Setter>
        </Style>
      </Setter.Value>
    </Setter>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type Fluent:CheckBox}">
          <BulletDecorator SnapsToDevicePixels="true" Background="Transparent" x:Name="bulletDecorator" Height="22">
            <BulletDecorator.Bullet>
              <Grid Width="13" Height="13" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="4,4,0,0">
                <Rectangle x:Name="rectangle" Fill="{DynamicResource CheckBoxOutterBackgroundBrush}"
                           Stroke="{DynamicResource CheckBoxOutterBorderBrush}" />
                <Rectangle x:Name="rectangle1" Margin="1,1,1,1" Fill="{x:Null}"
                           Stroke="{DynamicResource CheckBoxOutterBackgroundBrush}" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
                <Rectangle Margin="2,2,2,2" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
                           x:Name="defaultRect" Opacity="1" Stroke="{DynamicResource CheckBoxInnerBorderBrush}"
                           Fill="{DynamicResource CheckBoxInnerBackgroundBrush}" />
                <Rectangle x:Name="rectangle2" StrokeThickness="0" Margin="2" Opacity="0">
                  <Rectangle.Fill>
                    <RadialGradientBrush Center="0.496,1.004" GradientOrigin="0.496,1.004">
                      <GradientStop Color="White" />
                      <GradientStop Offset="1" />
                    </RadialGradientBrush>
                  </Rectangle.Fill>
                </Rectangle>
                <Path Margin="3,3,3,3" VerticalAlignment="Stretch" Stretch="Fill"
                      Data="M2.0594839,6.6033333 L5.8330001,9.4978325 10.00636,1.7586203" Fill="{x:Null}" Stroke="#FF6E7071"
                      StrokeEndLineCap="Triangle" StrokeDashCap="Square" StrokeThickness="2" StrokeStartLineCap="Triangle" x:Name="path">
                  <Path.BitmapEffect>
                    <OuterGlowBitmapEffect GlowColor="#BFFFFFFF" GlowSize="1" Opacity="1" />
                  </Path.BitmapEffect>
                </Path>
              </Grid>
            </BulletDecorator.Bullet>
            <TextBlock Text="{TemplateBinding Header}" Margin="8,3,4,0" />
          </BulletDecorator>
          <ControlTemplate.Triggers>
            <MultiTrigger>
              <MultiTrigger.Conditions>
                <Condition Property="IsMouseOver" Value="True" />
                <Condition Property="IsPressed" Value="False" />
              </MultiTrigger.Conditions>
              <Setter Property="Stroke" TargetName="rectangle" Value="{DynamicResource CheckBoxHoverOutterBorderBrush}" />
              <Setter Property="Fill" TargetName="rectangle"
                      Value="{DynamicResource CheckBoxHoverOutterBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle1"
                      Value="{DynamicResource CheckBoxHoverOutterBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="defaultRect"
                      Value="{DynamicResource CheckBoxHoverInnerBorderBrush}" />
              <Setter Property="Fill" TargetName="defaultRect"
                      Value="{DynamicResource CheckBoxHoverInnerBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="path" Value="Black" />
              <Setter Property="Opacity" TargetName="rectangle2" Value="0.25" />
            </MultiTrigger>
            <Trigger Property="IsPressed" Value="True">
              <Setter Property="Stroke" TargetName="rectangle" Value="{DynamicResource CheckBoxPressedOutterBorderBrush}" />
              <Setter Property="Fill" TargetName="rectangle"
                      Value="{DynamicResource CheckBoxPressedOutterBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="rectangle1"
                      Value="{DynamicResource CheckBoxPressedOutterBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="defaultRect"
                      Value="{DynamicResource CheckBoxPressedInnerBorderBrush}" />
              <Setter Property="Fill" TargetName="defaultRect"
                      Value="{DynamicResource CheckBoxPressedInnerBackgroundBrush}" />
              <Setter Property="Stroke" TargetName="path" Value="Black" />
              <Setter Property="Opacity" TargetName="rectangle2" Value="0.5" />
            </Trigger>
            <Trigger Property="IsChecked" Value="False">
              <Setter Property="Visibility" TargetName="path" Value="Hidden" />
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Opacity" TargetName="bulletDecorator" Value="0.3" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
    <Setter Property="Foreground" Value="#FF464646" />
  </Style>
</ResourceDictionary>